import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {Address} from "../../models/Address";
import {NewAddressPage} from "../new-address/new-address";

/**
 * Generated class for the AddressPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
    selector: 'page-address',
    templateUrl: 'address.html',
})
export class AddressPage {
    address: Address[];

    constructor(public navCtrl: NavController,
                public navParams: NavParams,) {

        this.address = [{
            name: "何婷婷",
            mobile: "123456789",
            address: "我认为奇特个"
        },
            {
                name: "何婷婷",
                mobile: "123456789",
                address: "西南科技大学的说法是官方"
            },
            {
                name: "何婷婷",
                mobile: "123456789",
                address: "双方各个分份人"
            }];
    }

     ionViewDidLoad() {
         console.log('ionViewDidLoad AddressPage');
     }

     public newAddress(){
        this.navCtrl.push(NewAddressPage)
     }

}
